/*
 * @Author       : Hejh(3010733382@qq.com)
 * @Version      : V1.0
 * @Date         : 2024-01-29 12:46:52
 * @Description  : 定时任务相关的类型
 */

import type { PageRes } from './commom'

export interface ScheduleTaskReq {
  page?: number
  pageSize?: number
}

// ScheduleTask返回实体
export interface ScheduleTaskRes {
  id: string
  name: string
  desc: string
  lastRunTime: string
  type: number
  sort: number
  isActive: number
  url: string
  time: string
  label: string
  system: number
}

// 分页ScheduleTask返回实体
export type ScheduleTaskPageRes = PageRes<ScheduleTaskRes>

// 定时任务添加请求实体类型
export interface ScheduleTaskCreateReq {
  name: string
  desc?: string
  url: string
  time: string
  isActive: number
}

// 定时任务修改请求实体
export interface ScheduleTaskUpdateReq extends ScheduleTaskCreateReq {
  scheduleTaskId?: string
}

export type ScheduleTaskRowData = ScheduleTaskRes
